// store.js (使用 Pinia)
import { defineStore } from 'pinia'

export const useRoomStore = defineStore({
    id: 'room',
    state: () => ({
        room: {
            dialogVisible: false,
            RoomPrice: 0,
            CurrentRoomId: 0,
            StartTime: 0,
            EndTime: 0,
            list: [
                {
                    id: 2,
                    room_name: '高级1',
                    room_type_id: 2,
                    price: 20,
                    status: 1,
                    remark: '',
                    weigh: 10,
                    update_time: 1734677152,
                    create_time: 1734615996,
                    time: '',
                    roomType: {
                        type_name: '高级麻将桌',
                    },
                },
            ],
        },
    }),
    actions: {
        updateRoom(newRoom: any) {
            this.room = newRoom
        },
    },
})
